use std::process::Command;

pub enum Distro {
    Debian,
    Arch,
    Fedora,
    Unknown,
}

pub fn detect_distro() -> Distro {
    let output = Command::new("lsb_release")
        .arg("-i")
        .output()
        .expect("Failed to detect distro");
    
    match String::from_utf8_lossy(&output.stdout).trim() {
        "Debian" | "Ubuntu" => Distro::Debian,
        "Arch" => Distro::Arch,
        "Fedora" => Distro::Fedora,
        _ => Distro::Unknown,
    }
}